/**
* Oxide
*
* Copyright (c) 2011 Dinosaur Kick Pty Ltd, All rights reserved.
*
* This source code is made available under the "Modified BSD" licensing arrangement.
* See license.txt for details.
*/
// ----------------------------------------------------------------------------
#include "node.hpp"
#include "expr.hpp"
// ----------------------------------------------------------------------------
#ifndef O2_AST_LITERAL_INC
#define O2_AST_LITERAL_INC
namespace o2 {
namespace ast {
// ----------------------------------------------------------------------------

#define O2_LITERAL(name, type) \
	template <typename StringT> \
	struct BOOST_PP_CAT(basic_, BOOST_PP_CAT(name, _literal)) \
		: public node_base<StringT, BOOST_PP_CAT(basic_, BOOST_PP_CAT(name, _literal)), basic_expr> \
	{ \
		O2_AST_TYPEDEFS(StringT); \
		typedef type value_type; \
		BOOST_PP_CAT(basic_, BOOST_PP_CAT(name, _literal))(const type& value) \
			: value(value) \
			{ } \
		const value_type value; \
	}

O2_LITERAL(string, StringT);
O2_LITERAL(integer, long long int);
O2_LITERAL(float, double);
O2_LITERAL(fixed, double);

// ----------------------------------------------------------------------------
} // namespace ast
} // namespace o2
#endif // O2_AST_CLASS_MEMBER_INC
// ----------------------------------------------------------------------------
